extends layout.pug

block title
  title= 'Settings'
  - var selected = 'settings'

block append script
    script(type='text/javascript', src='/editor/www/extern/codemirror.js')
    script(type='text/javascript', src='/editor/www/extern/javascript.js')
    script(type='text/javascript', src='/editor/www/extern/activate_codemirror.js')

block append css
    link(rel="stylesheet", href="/editor/www/extern/codemirror.css")
    link(rel="stylesheet", href="/editor/www/extern/neo.css")
    link(rel="stylesheet", href="/editor/www/extern/activate_codemirror.css")

block content
    p= message
    h1= 'Settings'
    p= 'These are general editor settings'
    form(method='post', action='/settings')
        div(class="form-group")
            label(for='1')= 'Default font size (pt)'
            input(id='1', class="form-control", type='number', name='fontSize', value=settings.fontSize)
        div(class="form-group")
            label(for='2')= 'Should the edges be curved'
            if settings.curved === "1"
                input(id='2', class="form-control", type='checkbox', name='curved', value="1", checked)
            else
                input(id='2', class="form-control", type='checkbox', name='curved', value="1")
        div(class="form-group")
            label(for='3')= 'Default stroke width of relations (1-200)'
            input(id='3', class="form-control", type='number', name='strokeWidth', value=settings.strokeWidth)
        input(type='submit', value='save')
        br
        p= 'Setting javascript'
        textarea(class="form-control javascript_textarea_big", name="js_config") #{settings.js_config}
        input(type='submit', value='save')
